package com.neusoft.dao;

import com.neusoft.util.MySqlProvider;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.UpdateProvider;

public interface BaseDao<T> {
    @InsertProvider(type = MySqlProvider.class,method = MySqlProvider.INSERT)
    int insert(T bean);

    @DeleteProvider(type = MySqlProvider.class,method = MySqlProvider.DELETE)
    int delete(String table, String where);

    @DeleteProvider(type = MySqlProvider.class,method = MySqlProvider.DELETE1)
    int delete1(String table, String where);

    @UpdateProvider(type = MySqlProvider.class,method = MySqlProvider.UPDATE)
    int update(T bean);
}
